﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace LiveCPEProject.login
{
	public partial class Login : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
            if (Context.User.Identity.IsAuthenticated)
            {
                Response.Redirect("~/wall/Wall.aspx");
            }
            else
            {
                LoginStatus lgs = (LoginStatus)Master.FindControl("LoginStatus1");
                lgs.Visible = false;
                TextBox tb = (TextBox)Master.FindControl("TextBoxSearch");
                tb.Visible = false;
                Button bt = (Button)Master.FindControl("ButtonSearch");
                bt.Visible = false;
            }
		}

        protected void LoginControl_LoggedIn(object sender, EventArgs e)
        {
            Response.Redirect("~/wall/Wall.aspx");
        }
	}
}